//
//  ewp_framework.m
//  ewp-framework
//
//  Created by Dirk Jacobasch on 21.12.11.
//  Copyright (c) 2011 NEURONprocessing. All rights reserved.
//

#import "EWPLibrary.h"
#import "InsuranceTabbarController.h"

@implementation EWPLibrary

@synthesize viewController;
@synthesize navCtrl;

- (id) init {
    self = [super init];
    if (self) {
        self.viewController = [[[InsuranceTabbarController alloc] initWithNibName:@"InsuranceTabbarController" bundle:nil] autorelease];
        self.navCtrl = [[[UINavigationController alloc] initWithRootViewController:self.viewController] autorelease];
    }
    
    return self;
}

// Open the ewp view in the given view controller
- (void)loadInsuranceViewWithViewController:(UIViewController *)ctrl {
    [UIApplication sharedApplication].statusBarHidden = YES;
    self.wantsFullScreenLayout = YES;
    self.navCtrl.navigationBarHidden = YES;
	[ctrl presentModalViewController:self.navCtrl animated:YES];
}

- (void)dealloc {
    [viewController release];
    [navCtrl release];
    [super dealloc];
}

@end
